<template functional>
    <Sub
            :key="props.dataa.id"
    >
    <span slot="title">
      <Icon type="mail"/><span>{{ props.dataa.name }}</span>
    </span>
        <template v-for="item in props.dataa.children">
            <Item
                    v-if="!item.children"
                    :key="item.id"
            >
                <Icon type="pie-chart"/>
                <span>{{ item.name }}</span>
            </Item>

        </template>
    </Sub>
</template>

<script>
    import {Menu, Icon} from 'ant-design-vue';
    const SubMenu = Menu.SubMenu;
    const Item = Menu.Item;
    export default {
        props: ['dataa'],
        components: {
            Menu,
            SubMenu,
            Sub: Menu.SubMenu,
            Item,
            Icon
        }
    }
</script>